﻿using System.Windows.Controls;
using System.Windows.Input;

namespace Lottery.Client.SL.Controls
{
    public partial class AgentCenter : UserControl
    {
        private bool _bool;
        public ISystemMain IMain;
        public AgentCenter()
		{
			this.InitializeComponent();
			this.CvUserList.MouseLeftButtonDown+=(new MouseButtonEventHandler(this.CvUserList_MouseLeftButtonDown));
            this.CvAddUser.MouseLeftButtonDown += (new MouseButtonEventHandler(this.CvAddUser_MouseLeftButtonDown));
            this.CvAddMoney.MouseLeftButtonDown += (new MouseButtonEventHandler(this.CvAddMoney_MouseLeftButtonDown));
		}
        private void CvUserList_MouseLeftButtonDown(object obj, MouseButtonEventArgs mouseButtonEventArgs)
        {
            UserList obj2 = new UserList();
            this.IMain.LoadUserControl(obj2);
        }
        private void CvAddUser_MouseLeftButtonDown(object obj, MouseButtonEventArgs mouseButtonEventArgs)
        {
            this.IMain.SetReplicate(true);
            AddMember addMember = new AddMember();
           // addMember.ShowAddWindow(DataCache.CurrentUserInfo.BackPct);
        }
        private void CvAddMoney_MouseLeftButtonDown(object obj, MouseButtonEventArgs mouseButtonEventArgs)
        {
            this.IMain.SetReplicate(true);
            //验证代理权限
            if (PublicFunction.CheckAgent(""))
            {
                Withdrawal withdrawal = new Withdrawal();
                withdrawal.ShowUserAddMoney();
                return;
            }
            App.ShowMsg("您无法使用该权限！");
        }
    }
}